import request from '../utils/request'



export const createArticle = (title, content) => {
    return request({
        url: '/article/create',
        method: 'POST',
        data: {
            title,
            content
        }
    })
}



export const getArticleList = (page = 1, size = 5) => {
    return request({
        url: `/article/list?page=${page}&size=${size}`,
        method: 'GET',
    })
}


export const articleDetail = (id) => {
    return request({
        url: `/article/${id}`,
        method: 'GET',
    })
}